// service/impl/StatisticsServiceImpl_pmh.java
package com.scuec.groupfive.service.impl;

import com.scuec.groupfive.mapper.StatisticsMapper_pmh;
import com.scuec.groupfive.service.StatisticsService_pmh;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StatisticsServiceImpl_pmh implements StatisticsService_pmh {

    @Autowired
    private StatisticsMapper_pmh statisticsMapper;

    @Override
    public Double getLast30DaysDAU() {
        Double result = statisticsMapper.getLast30DaysDAU();
        return result != null ? result : 0.0;
    }

    @Override
    public Double getAvgQuestionsPerUser(String startDate, String endDate) {
        Double result = statisticsMapper.getAvgQuestionsPerUser(startDate, endDate);
        return result != null ? result : 0.0;
    }
}